package net.k3rnel.abugadro.gcodes.beans;

import net.k3rnel.abugadro.AbugadroContentProvider;
import android.net.Uri;
import android.provider.BaseColumns;

public class GoogleCode {

	public GoogleCode() {
	}

	public static final class GCode implements BaseColumns {
		private GCode() {
		}

		public static final Uri CONTENT_URI = Uri.parse("content://"+ AbugadroContentProvider.AUTHORITY + "/gcode");

		public static final String CONTENT_TYPE_DIR = "vnd.android.cursor.dir/vnd.abugadro.gcodes";
		public static final String CONTENT_TYPE_ITEM = "vnd.android.cursor.item/vnd.abugadro.gcode";

		public static final String _ID = "_id";
		public static final String PROJECT_ID = "proj_id";
		public static final String CODETYPE = "codetype";
		public static final String USERNAME = "username";
		public static final String PASSWORD = "password";
		public static final String LASTSYNC = "lastsync";
		
		public static final String DEFAULT_SORT = PROJECT_ID + " ASC";
		
		/** Build {@link Uri} for requested {@link #_ID}. */
        public static Uri buildFullUri(String gcodeId) {
        	return Uri.parse("content://"+ AbugadroContentProvider.AUTHORITY + "/gcode/"+gcodeId);
        }
        public static Uri buildFullUri(int gcodeId) {
        	return Uri.parse("content://"+ AbugadroContentProvider.AUTHORITY + "/gcode/"+gcodeId);
        }
        public static Uri buildUri(String gcodeId) {
            return CONTENT_URI.buildUpon().appendPath(gcodeId).build();
        }
	}

}